﻿<phone:PhoneApplicationPage 
    x:Class="BitcoinMarket.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:local="clr-namespace:BitcoinMarket"
    xmlns:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
    xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
    xmlns:chartEngine="clr-namespace:Telerik.Charting;assembly=Telerik.Windows.Controls.Chart"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" 
    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False" xmlns:my="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
    local:TiltEffect.IsTiltEnabled="True" DataContext="{Binding Source={StaticResource PhoneForegroundBrush}}">
    
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="White">
        <!--Rectangle Width="1000" Height="243" HorizontalAlignment="Left" VerticalAlignment="Top" Fill="#FFF7931A">
        </Rectangle-->
        <!--Image Source="/Images/panorama-bg.png" VerticalAlignment="Bottom" Opacity="0.4" /-->
        <!--Panorama control-->
        <controls:Panorama Foreground="White">
            <controls:Panorama.Title>
                <Grid Margin="10, 95, 0, -15">
                    <Image x:Name="HeaderImage" Source="/Images/HeaderImg.png" />
                </Grid>
            </controls:Panorama.Title>
            <!--Panorama item one-->
            <controls:PanoramaItem Header="{Binding Path=LocalizedResources.Currency, Source={StaticResource LocalizedStrings}}" Foreground="#FFF7931A">
                
                <Grid x:Name="DataGridLayout" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Name="LabelAvgPriceOneBtc" Text="{Binding Path=LocalizedResources.PriceOneBitcoin, Source={StaticResource LocalizedStrings}}" Margin="12, -40, 0, 0" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}" Height="Auto" Foreground="#FF4D4D4D" />
                    <TextBlock Text="{Binding Path=LocalizedResources.hrs24, Source={StaticResource LocalizedStrings}}" Margin="13, -13, 0, 0" TextWrapping="Wrap" Style="{StaticResource PhoneTextSmallStyle}" Height="Auto" Foreground="#A44D4D4D" />
                    <TextBlock Text="{Binding Path=LocalizedResources.days7, Source={StaticResource LocalizedStrings}}" Margin="120, -13, 0, 0" TextWrapping="Wrap" Style="{StaticResource PhoneTextSmallStyle}" Height="Auto" Foreground="#A44D4D4D" />
                    <TextBlock Text="{Binding Path=LocalizedResources.days30, Source={StaticResource LocalizedStrings}}" Margin="231, -13, 0, 0" TextWrapping="Wrap" Style="{StaticResource PhoneTextSmallStyle}" Height="Auto" Foreground="#A44D4D4D" />

                    <ProgressBar Grid.Row="2" Visibility="{Binding IsLoading.IsTrueVisibility}" IsIndeterminate="true" x:Name="customIndeterminateProgressBar" Style="{StaticResource CustomIndeterminateProgressBar}" Foreground="#F7931A" />
                    
                    <!--Double line list with text wrapping-->
                    <ListBox Style="{StaticResource ListBoxStyle1}" Grid.Row="1" Margin="0,5,-12,0" ItemsSource="{Binding Items}" SelectionChanged="ListBox_SelectionChanged" Foreground="#FFF7931A">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Width="432" HorizontalAlignment="Left">
                                    <Grid x:Name="DataGridLayout" ShowGridLines="False">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto"/>
                                            <RowDefinition Height="*"/>
                                        </Grid.RowDefinitions>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="110"/>
                                            <ColumnDefinition Width="110"/>
                                            <ColumnDefinition Width="*"/>                                            <ColumnDefinition Width="80"/>
                                        </Grid.ColumnDefinitions>
                                        <TextBlock Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Text="{Binding CurrencyName}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" Foreground="#4D4D4D" />

                                        <TextBlock Grid.Row="1" Grid.Column="0" Text="{Binding H24}" TextWrapping="Wrap" Style="{StaticResource PhoneTextSmallStyle}" Height="Auto" Foreground="#A44D4D4D" />
                                        <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding D7}" TextWrapping="Wrap" Style="{StaticResource PhoneTextSmallStyle}" Height="Auto" Foreground="#A44D4D4D" />
                                        <TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding D30}" TextWrapping="Wrap" Style="{StaticResource PhoneTextSmallStyle}" Height="Auto" Foreground="#A44D4D4D" />
                                    </Grid>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </Grid>
            </controls:PanoramaItem>
 
            <!--Panorama item two-->
            <!--Use 'Orientation="Horizontal"' to enable a panel that lays out horizontally-->
            <controls:PanoramaItem Header="{Binding Path=LocalizedResources.NetworkStatus, Source={StaticResource LocalizedStrings}}" Foreground="#FFF7931A">
                <Grid x:Name="NetworkInfoGridLayout" Margin="0, -30, 0, 0" >
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <ProgressBar Grid.Row="0" Height="4" Margin="0, 0, 0, 0" HorizontalAlignment="Left" x:Name="NetworkStatusProgressBar" VerticalAlignment="Center" Width="420" Foreground="#F7931A" Style="{StaticResource CustomIndeterminateProgressBar}" IsIndeterminate="True" />
                    
                    <ListBox Height="490" Grid.Row="0" x:Name="NetworkInfoListbox" Style="{StaticResource ListBoxStyle1}" Margin="0,5,-12,0" Width="Auto" SelectionChanged="ListBox_SelectionChanged_1">
                       
                    </ListBox>
                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>
    
    <!--phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True" ForegroundColor="Black" Opacity="1" BackgroundColor="#FFD8D8D8">
            <shell:ApplicationBarIconButton IconUri="Images/appbar.refresh.rest.png" Text="Reload" Click="ApplicationBarIconButton_Click" />
            <-shell:ApplicationBarIconButton IconUri="Images/appbar.feature.settings.rest.png" Text="Settings"/->
            <shell:ApplicationBar.MenuItems>
                <-shell:ApplicationBarMenuItem Text="rate this app"/->
                <shell:ApplicationBarMenuItem Text="settings" Click="ApplicationBarMenuItem_Click_1" />
                <shell:ApplicationBarMenuItem Text="about" Click="ApplicationBarMenuItem_Click" />
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar-->
</phone:PhoneApplicationPage>